package com.hung.pojo;

import java.util.Objects;

/**
 * 评论类
 * @author Hung
 */
public class Comment {
    Integer id;
    /**
     * 事件id
     */
    Integer mid;
    /**
     * 用户id
     */
    Integer uid;
    /**
     * 评论
     */
    String comment;
    /**
     * 昵称
     */
    String nickName;

    public Comment() {
    }

    public Comment(Integer id, Integer mid, Integer uid, String comment, String nickName) {
        this.id = id;
        this.mid = mid;
        this.uid = uid;
        this.comment = comment;
        this.nickName = nickName;
    }

    public Comment(Integer id, Integer mid, Integer uid, String comment) {
        this.id = id;
        this.mid = mid;
        this.uid = uid;
        this.comment = comment;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public Integer getMid() {
        return mid;
    }

    public void setMid(Integer mid) {
        this.mid = mid;
    }

    public Integer getUid() {
        return uid;
    }

    public void setUid(Integer uid) {
        this.uid = uid;
    }

    public String getComment() {
        return comment;
    }

    public void setComment(String comment) {
        this.comment = comment;
    }

    public String getNickName() {
        return nickName;
    }

    public void setNickName(String nickName) {
        this.nickName = nickName;
    }

    @Override
    public String
    toString() {
        return "Comment{" +
                "id=" + id +
                ", mid=" + mid +
                ", uid=" + uid +
                ", comment='" + comment + '\'' +
                ", nickName='" + nickName + '\'' +
                '}';
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) {
            return true;
        }
        if (o == null || getClass() != o.getClass()) {
            return false;
        }
        Comment comment1 = (Comment) o;
        return Objects.equals(id, comment1.id) && Objects.equals(mid, comment1.mid) && Objects.equals(uid, comment1.uid) && Objects.equals(comment, comment1.comment) && Objects.equals(nickName, comment1.nickName);
    }

    @Override
    public int hashCode() {
        return Objects.hash(id, mid, uid, comment, nickName);
    }
}
